package com.easy.service.impl;

import com.easy.bean.Product;
import com.easy.dao.ProductDao;
import com.easy.service.IProductService;
import com.easy.util.Page;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.Collections;
import java.util.List;

@Service
public class ProductServiceImpl implements IProductService {
    @Autowired
    private ProductDao productDao;
    @Override
    public List getList(Product product, Page page) {
        return productDao.list(product, page);
    }

    @Override
    public Product getProductById(Integer id) {
        return productDao.getProductByID(id);
    }

    @Override
    public int count(Product product) {
        return productDao.count(product);
    }
}
